package com.yudean.esb.dao.mds;

import com.yudean.esb.domain.mds.MdsPLNEntities;
import com.yudean.esb.mapper.mds.MdsPLNEntitiesMapper;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;


@Repository("mdsPLNEntitiesDao")
@Scope("prototype")
public class MdsPLNEntitiesDao {
    @Resource
    private MdsPLNEntitiesMapper mdsPLNEntitiesMapper;

    /**
     * @return
     */
    public List<MdsPLNEntities> getAllPLNEntities() {

        List<MdsPLNEntities> list = mdsPLNEntitiesMapper.getAllPLNEntities();
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }

    public List<MdsPLNEntities> getPLNEntitiesByYear(String year) {

        List<MdsPLNEntities> list = mdsPLNEntitiesMapper.getPLNEntitiesByYear(year);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }
}
